<template>
  <div class="view">
    <div class="rules-container">
      <div class="rule-item" @click="safe(1)">
        <img class="icon" src="/static/images/x_ico_tl.png" alt="">
        <span>考拉出行平台服务协议</span>
        <img class="right" src="/static/images/arrow_r.png" alt="">
      </div>
      <div class="rule-item" @click="safe(2)">
        <img class="icon" src="/static/images/x_ico_ys.png" alt="">
        <span>考拉出行隐私保护政策</span>
        <img class="right" src="/static/images/arrow_r.png" alt="">
      </div>
      <div class="rule-item" @click="safe(3)">
        <img class="icon" src="/static/images/x_ico_yc.png" alt="">
        <span>考拉出行用车服务协议</span>
        <img class="right" src="/static/images/arrow_r.png" alt="">
      </div>
      <div class="rule-item" @click="safe(4)">
        <img class="icon" src="/static/images/x_ico_bx.png" alt="">
        <span>考拉出行用车保险协议</span>
        <img class="right" src="/static/images/arrow_r.png" alt="">
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    data() {
      return {
        
      }
    },
    methods: {
      safe(type){
        let options = {
          1:'https://api.beidouxintong.com/kaolaxxc/ptfw.htm',
          2:'https://api.beidouxintong.com/kaolaxxc/ycbx.htm',
          3:'https://api.beidouxintong.com/kaolaxxc/ycfw.htm',
          4:'https://api.beidouxintong.com/kaolaxxc/ysbh.htm'
        }
        wx.navigateTo({
          url: `../webView/main?url=${options[type]}`
        })
      },
    }
  }
</script>

<style scoped>
  .view {
    padding: 0;
  }
  .rules-container {
    margin-top: 60px;
  }
  .rules-container .rule-item {
    position: relative;
    padding: 20px 0;
    margin-left: 100px;
    border-bottom: 1px solid #cccccc;
  }
  .icon {
    position: absolute;
    left: -75px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
  }
  span {
    font-size: 28px;
    vertical-align: middle;
  }
  .right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
  }
</style>
